# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-logilab-common
_pkgname=logilab-common
pkgver=1.7.2
pkgrel=0
pkgdesc="A collection of Python3 packages and modules used by Logilab projects"
url="https://www.logilab.org/project/logilab-common"
arch="noarch"
license="LGPL-2.0-or-later"
depends="python3 py3-mypy-extensions py3-setuptools py3-typing-extensions"
checkdepends="py3-tz"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-logilab-common" # Backwards compatibility
provides="py-logilab-common=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python3 bin/logilab-pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="aa129645a81cd95bd112000a312dce965c714bddd393a8174cb012a549a61e5433864fdcbc2ee9325c5025dcb4948f0861b611e86ae09a032afe435089d6ea04  logilab-common-1.7.2.tar.gz"
